{% extends "events/base.html" %}
{% load i18n %}

{% block breadcrumbs %}{% if not is_popup %}
<div class="breadcrumbs">
     <a href="../../">Home</a> &rsaquo;
     <a href="../">Event Manager</a> &rsaquo;
     Archive
     
</div>
{% endif %}{% endblock %}

{% block content %}

<h1>Active Events</h1>
<br />
<table>
        <tr>
    		<th>Event Name</th>
    		<th>Dates</th>
    		<th>Event Type</th>
    		<th>Status</th>
    	</tr>
        {% for event in active_events %}
        <tr>
        	<td><a href="/events/{{ event.id }}/">{{ event.Name }}</a></td>
        	<td>{{event.Start_Date}} - {{event.End_Date}}</td>
        	<td>{{ event.content_type|title }}</td>
        	<td>{{ event.get_approval_status_display}}</td>
        </tr>
        {% endfor %}
</table>
<br />
<br />
<br />
<h1>Archived Events</h1>
{% regroup archive_events by Start_Date.year as archive_event_list %}
{% for year in archive_event_list %}
    <h2>{{year.grouper }}</h2>
    <table>
        	<tr>
    		<th>Event Name</th>
    		<th>Dates</th>
    		<th>Event Type</th>
    		<th>Approval</th>
    	</tr>
        {% for event in year.list %}
        <tr>
        	<td><a href="/events/{{ event.id }}/">{{ event.Name }}</a></td>
        	<td>{{event.Start_Date}} - {{event.End_Date}}</td>
        	<td>{{ event.content_type|title }}</td>
        	<td>{{ event.approval_date}}</td>
        </tr>
        {% endfor %}
    </table>
    <br />
{% endfor %}

{% endblock %}
